package com.community.itelligentcommunity.community.myCommunity.controller;

import com.community.itelligentcommunity.common.base.controller.GenericController;
import com.community.itelligentcommunity.common.base.service.GenericService;
import com.community.itelligentcommunity.community.myCommunity.entity.QueryRepairControlInf;
import com.community.itelligentcommunity.community.myCommunity.entity.RepairControlInf;
import com.community.itelligentcommunity.community.myCommunity.service.RepairControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/onlineRepairControl")
public class OnlineRepairController extends GenericController<RepairControlInf, QueryRepairControlInf> {

    @Autowired
    private RepairControlService  repairControlService;

    @Override
    protected GenericService<RepairControlInf, QueryRepairControlInf> getService() {
        return repairControlService;
    }
    @Override
    public String addPage() throws Exception {
        return "community/myCommunity/onlineRepairControl/add";
    }


    @Override
    public String updatePage(RepairControlInf entity, Model model) throws Exception {
        entity = getService().get(entity);
        model.addAttribute("entity",entity);
        return "community/myCommunity/onlineRepairControl/update";
    }
}
